package d03;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入用户名：");
        String name = sc.next();
//        验证用户名是否可用
        if (name.equals("admin")){
             throw new UsernameAlreadyExistsException("已存在");
        }else {
            System.out.println("用户名可用");
        }

    }
}
